/**
 * 个人中心路由
 */

import addressRouter from '../my-address/router/index.js';
import walletRouter from '../wallet/router/index.js';
import userCenterRouter from '../user-center/router/index.js';

const issueOrder = () => import('../issue-order/issue-order.vue');
const feedback = () => import('../feedback/feedback.vue');

export default [
    {
        path: 'wallet',
        name: 'wallet',
        component: { render: createElement => createElement('router-view') },
        redirect: { name: 'myWallet' },
        children: walletRouter
    },
    {
        path: 'address',
        name: 'address',
        component: { render: createElement => createElement('router-view') },
        redirect: { name: 'my-address' },
        children: addressRouter
    },
    {
        path: 'issue',
        name: 'issue-order',
        component: issueOrder,
        meta: {
            title: '发布'
        }
    },
    {
        path: 'feedback',
        name: 'feedback',
        component: feedback,
        meta: {
            title: '意见与建议'
        }
    },
    {
        path: 'user',
        name: 'profileInfo',
        component: { render: createElement => createElement('router-view') },
        redirect: { name: 'userCenter' },
        children: userCenterRouter
    }
];
